package com.contactbook.web.client.service;

import java.util.List;
import java.util.Set;

import com.contactbook.web.client.dto.ContactDTO;
import com.google.gwt.user.client.rpc.AsyncCallback;


public interface ContactServiceAsync {

	void login(String login, String password, AsyncCallback<Void> callback);

	void logout(AsyncCallback<Void> callback);
	
	void add(ContactDTO contact, int groupId, String login, String password, AsyncCallback<ContactDTO> callback);

	void add(ContactDTO contact, String login, String password, AsyncCallback<ContactDTO> callback);

	void delete(int contactId, String login, String password, AsyncCallback<Void> callback);

	void getContactById(int contactId, String login, String password, AsyncCallback<ContactDTO> callback);

	void getContacts(String login, String password, AsyncCallback<Set<ContactDTO>> callback);

	void getContacts(int groupId, String login, String password, AsyncCallback<Set<ContactDTO>> callback);

	void getContactsByName(String firstName, String lastName, String login, String password,
			AsyncCallback<List<ContactDTO>> callback);

	void update(ContactDTO contact, String login, String password, AsyncCallback<Void> callback);


	void getContactsWithoutGroup(String login, String password,
			AsyncCallback<Set<ContactDTO>> callback);
}
